home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / OCEStandardDirectory.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  26.6 KB  |  959 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OCEStandardDirectory.a
  3. ;
  4. ;    Contains:    Apple Open Collaboration Environment Standard Directory Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__OCESTANDARDDIRECTORY__') = 'UNDEFINED' THEN
  19. __OCESTANDARDDIRECTORY__ SET 1
  20.  
  21.     IF &TYPE('__ICONS__') = 'UNDEFINED' THEN
  22.     include 'Icons.a'
  23.     ENDIF
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  28.     include 'Quickdraw.a'
  29.     ENDIF
  30.  
  31.     IF &TYPE('__OCE__') = 'UNDEFINED' THEN
  32.     include 'OCE.a'
  33.     ENDIF
  34.     IF &TYPE('__OCEAUTHDIR__') = 'UNDEFINED' THEN
  35.     include 'OCEAuthDir.a'
  36.     ENDIF
  37.  
  38.  
  39. ;  generic icon suites 
  40.  
  41. genericDirectoryIconResource    EQU        -16721                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  42. genericLockedDirectoryIconResource EQU    -16716                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  43. genericRecordIconResource        EQU        -16722                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  44. genericAttributeIconResource    EQU        -16723                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  45. genericTemplateIconResource        EQU        -16746                ; icl8, icl4, ICN#, ics#, ics4, ics8 
  46.  
  47. ;  standard icon suites 
  48.  
  49. directoryFolderIconResource        EQU        -16720                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  50. lockedDirectoryFolderIconResource EQU    -16719                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  51. personalDirectoryIconResource    EQU        -16718                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  52. directoriesIconResource            EQU        -16717                ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  53. preferredPersonalDirectoryIconResource EQU -16724            ; icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  54. ;  icon IDs for spinning arrows 
  55.  
  56. kFirstSpinnerIcon                EQU        -16745
  57. kLastSpinnerIcon                EQU        -16738
  58. ;  resource types 
  59.  
  60. kSDPPanelResourceType            EQU        'panl'
  61. kSDPFindPanelResourceType        EQU        'find'
  62. ;  Standard FindPanel resource 
  63.  
  64. kStandardFindLayout                EQU        -16700
  65. ;  Prompt For Identity structures 
  66.  
  67. kSDPGuestBit                    EQU        0
  68. kSDPSpecificIdentityBit            EQU        1
  69. kSDPLocalIdentityBit            EQU        2
  70. ;  Values of SDPIdentityKind 
  71.  
  72. kSDPGuestMask                    EQU        $01
  73. kSDPSpecificIdentityMask        EQU        $02
  74. kSDPLocalIdentityMask            EQU        $04
  75. ; typedef unsigned short                 SDPIdentityKind
  76.  
  77.  
  78. kSDPSuggestionOnly                EQU        0
  79. kSDPRestrictToDirectory            EQU        1
  80. kSDPRestrictToRecord            EQU        2
  81. ; typedef unsigned short                 SDPLoginFilterKind
  82.  
  83.  
  84.  
  85. ;  Panel Structures 
  86. ;While the panel is in operation, four selection states may exist.
  87. ;    1) kSDPNothingSelected means nothing is selected.
  88. ;    2) kContainSelected means a volume, folder, catalog, dnode, or PAB is selected.
  89. ;    3) kSDPLockedContainerSelected means one of the above, but no access privledges.
  90. ;    4) kSDPRecordSelected means that a record is currently selected.
  91. ;
  92.  
  93. ;  Values of SDPSelectionState 
  94.  
  95. kSDPNothingSelected                EQU        0
  96. kSDPLockedContainerSelected        EQU        1
  97. kSDPContainerSelected            EQU        2
  98. kSDPRecordSelected                EQU        3
  99. kSDPRecordAliasSelected            EQU        4
  100. kSDPContainerAliasSelected        EQU        5
  101. ; typedef unsigned short                 SDPSelectionState
  102.  
  103.  
  104.  
  105. ;This type informs the caller of the action the user took, either as the result
  106. ;of an event (as returned by SDPPanelEvent) or when SDPOpenSelectedItem is called.
  107. ;
  108. ;kSDPProcessed means that the event (or call to SDPOpenSelectedItem) resulted in no
  109. ;state change.
  110. ;
  111. ;kSDPSelectedAnItem indicates that the user wants to select the currently-hilited
  112. ;record. This is returned, for example, when a user double-clicks on a record.
  113. ;
  114. ;kSDPChangedSelection implies that the user clicked on a new item (which may mean
  115. ;that no item is selected).
  116. ;
  117.  
  118. ;  Values of SDPPanelState 
  119.  
  120. kSDPProcessed                    EQU        0
  121. kSDPSelectedAnItem                EQU        1
  122. kSDPChangedSelection            EQU        2
  123. ; typedef unsigned short                 SDPPanelState
  124.  
  125. ;Your application may read any of the fields in a SDPPanelRecord, but it should
  126. ;use the appropriate routines to make changes to the records with the exception
  127. ;of the refCon field which your application may read or write at will.  Private
  128. ;information follows the SDPPanelRecord, so the handle must not be re-sized.
  129. ;
  130.  
  131. SDPPanelRecord            RECORD 0
  132. bounds                     ds        Rect            ; offset: $0 (0)
  133. visible                     ds.b    1                ; offset: $8 (8)
  134. enabled                     ds.b    1                ; offset: $9 (9)
  135. focused                     ds.b    1                ; offset: $A (10)
  136. padByte                     ds.b    1                ; offset: $B (11)
  137. identity                 ds.l    1                ; offset: $C (12)
  138. refCon                     ds.l    1                ; offset: $10 (16)
  139. listRect                 ds        Rect            ; offset: $14 (20)
  140. popupRect                 ds        Rect            ; offset: $1C (28)
  141. numberOfRows             ds.w    1                ; offset: $24 (36)
  142. rowHeight                 ds.w    1                ; offset: $26 (38)
  143. pabMode                     ds.b    1                ; offset: $28 (40)
  144. filler1                     ds.b    1                ; offset: $29 (41)
  145. sizeof                     EQU *                    ; size:   $2A (42)
  146.                         ENDR
  147. ; typedef struct SDPPanelRecord *        SDPPanelPtr
  148.  
  149. ; typedef SDPPanelPtr *                    SDPPanelHandle
  150.  
  151. ; typedef PanelBusyUPP                     PanelBusyProc
  152.  
  153. ;  Find Panel Structures 
  154.  
  155. kSDPItemIsSelectedBit            EQU        0
  156. kSDPFindTextExistsBit            EQU        1
  157. ;  Values of SDPFindPanelState 
  158.  
  159. kSDPItemIsSelectedMask            EQU        $01
  160. kSDPFindTextExistsMask            EQU        $02
  161. ; typedef unsigned short                 SDPFindPanelState
  162.  
  163. ;  Values of SDPFindPanelFocus 
  164.  
  165. kSDPFindPanelNoFocus            EQU        0
  166. kSDPFindPanelListHasFocus        EQU        1
  167. kSDPFindPanelTextHasFocus        EQU        2
  168. ; typedef unsigned short                 SDPFindPanelFocus
  169.  
  170.  
  171.  
  172. SDPFindPanelRecord        RECORD 0
  173. upperLeft                 ds        Point            ; offset: $0 (0)
  174. visible                     ds.b    1                ; offset: $4 (4)
  175. enabled                     ds.b    1                ; offset: $5 (5)
  176. nowFinding                 ds.b    1                ; offset: $6 (6)
  177. padByte                     ds.b    1                ; offset: $7 (7)
  178. currentFocus             ds.w    1                ; offset: $8 (8)
  179. identity                 ds.l    1                ; offset: $A (10)
  180. simultaneousSearchCount     ds.w    1                ; offset: $E (14)
  181. refCon                     ds.l    1                ; offset: $10 (16)
  182. sizeof                     EQU *                    ; size:   $14 (20)
  183.                         ENDR
  184. ; typedef struct SDPFindPanelRecord *    SDPFindPanelPtr
  185.  
  186. ; typedef SDPFindPanelPtr *                SDPFindPanelHandle
  187.  
  188. ;  Values of SDPFindPanelResult 
  189.  
  190. kSDPSelectedAFindItem            EQU        0
  191. kSDPFindSelectionChanged        EQU        1
  192. kSDPFindCompleted                EQU        2
  193. kSDPTextStateChanged            EQU        3
  194. kSDPFocusChanged                EQU        4
  195. kSDPSelectionAndFocusChanged    EQU        5
  196. kSDPMenuChanged                    EQU        6
  197. kSDPSelectionAndMenuChanged        EQU        7
  198. kSDPProcessedFind                EQU        8
  199. ; typedef unsigned short                 SDPFindPanelResult
  200.  
  201. ; typedef PackedPathNamePtr *            PackedRStringListHandle
  202.  
  203. ; typedef FindPanelBusyUPP                 FindPanelBusyProc
  204.  
  205. ;  Prompt For Identity Routines 
  206. ;
  207. ; pascal OSErr SDPPromptForID(AuthIdentity *id, ConstStr255Param guestPrompt, ConstStr255Param specificIDPrompt, ConstStr255Param localIDPrompt, const RString *recordType, SDPIdentityKind permittedKinds, SDPIdentityKind *selectedKind, const RecordID *loginFilter, SDPLoginFilterKind filterKind)
  208. ;
  209.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  210.         Macro
  211.         _SDPPromptForID
  212.             move.l              #$00100388,D0
  213.             dc.w                $AA5D
  214.         EndM
  215.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  216.         IMPORT_CFM_FUNCTION SDPPromptForID
  217.     ENDIF
  218.  
  219.  
  220.  
  221. ;SDPNewPanel creates a new panel. You supply the window in which the panel
  222. ;is to live, the bounds for the panel (which includes both the menu and the list),
  223. ;whether or not the panel is to be initially visible, the initial RLI (nil for
  224. ;catalogs and volumes), the types of records that will be shown (only a single
  225. ;(non-nil) type which may contain wildcards), the identity by which to browse
  226. ;(for access control reasons), and a refCon which is  available to the caller.
  227. ;
  228.  
  229. ;
  230. ; pascal OSErr SDPNewPanel(SDPPanelHandle *newPanel, WindowPtr window, const Rect *bounds, Boolean visible, Boolean enabled, const PackedRLI *initialRLI, const RStringPtr *typesList, unsigned long typeCount, AuthIdentity identity, DirEnumChoices enumFlags, DirMatchWith matchTypeHow, long refCon)
  231. ;
  232.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  233.         Macro
  234.         _SDPNewPanel
  235.             move.l              #$00150064,D0
  236.             dc.w                $AA5D
  237.         EndM
  238.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  239.         IMPORT_CFM_FUNCTION SDPNewPanel
  240.     ENDIF
  241.  
  242.  
  243. ;SDPSetIdentity Sets the identity used for browsing.  NOTE: This call is likely to go
  244. ;away if the new authentication scheme works.
  245. ;
  246.  
  247. ;
  248. ; pascal OSErr SDPSetIdentity(SDPPanelHandle panel, AuthIdentity identity)
  249. ;
  250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  251.         Macro
  252.         _SDPSetIdentity
  253.             move.l              #$00040073,D0
  254.             dc.w                $AA5D
  255.         EndM
  256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION SDPSetIdentity
  258.     ENDIF
  259.  
  260.  
  261.  
  262.  
  263. ;SDPGetNewPanel is similar to SDPNewPanel above, except it takes a resource id of a
  264. ;'panl' resource.
  265. ;
  266.  
  267. ;
  268. ; pascal OSErr SDPGetNewPanel(SDPPanelHandle *newPanel, short resourceID, WindowPtr window, const PackedRLI *initialRLI, AuthIdentity identity)
  269. ;
  270.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  271.         Macro
  272.         _SDPGetNewPanel
  273.             move.l              #$00090065,D0
  274.             dc.w                $AA5D
  275.         EndM
  276.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  277.         IMPORT_CFM_FUNCTION SDPGetNewPanel
  278.     ENDIF
  279.  
  280.  
  281. ;Call this when you're completely done with a panel. It deallocates all of the
  282. ;associated data structures.
  283. ;
  284.  
  285. ;
  286. ; pascal OSErr SDPDisposePanel(SDPPanelHandle panel)
  287. ;
  288.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  289.         Macro
  290.         _SDPDisposePanel
  291.             move.l              #$00020066,D0
  292.             dc.w                $AA5D
  293.         EndM
  294.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  295.         IMPORT_CFM_FUNCTION SDPDisposePanel
  296.     ENDIF
  297.  
  298.  
  299. ;If the panel is visible, it makes it invisible by hiding the menu, turning off
  300. ;drawing of the list, and erasing and  invaling the list's rectangle.
  301. ;
  302.  
  303. ;
  304. ; pascal OSErr SDPHidePanel(SDPPanelHandle panel)
  305. ;
  306.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  307.         Macro
  308.         _SDPHidePanel
  309.             move.l              #$00020067,D0
  310.             dc.w                $AA5D
  311.         EndM
  312.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  313.         IMPORT_CFM_FUNCTION SDPHidePanel
  314.     ENDIF
  315.  
  316.  
  317. ;  If the panel is invisible, it makes it visible and draws it. 
  318. ;
  319. ; pascal OSErr SDPShowPanel(SDPPanelHandle panel)
  320. ;
  321.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  322.         Macro
  323.         _SDPShowPanel
  324.             move.l              #$00020068,D0
  325.             dc.w                $AA5D
  326.         EndM
  327.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  328.         IMPORT_CFM_FUNCTION SDPShowPanel
  329.     ENDIF
  330.  
  331.  
  332. ;  Disables the list and menu so that it won't accept any commands. 
  333. ;
  334. ; pascal OSErr SDPEnablePanel(SDPPanelHandle panel, Boolean enable)
  335. ;
  336.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  337.         Macro
  338.         _SDPEnablePanel
  339.             move.l              #$00030069,D0
  340.             dc.w                $AA5D
  341.         EndM
  342.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  343.         IMPORT_CFM_FUNCTION SDPEnablePanel
  344.     ENDIF
  345.  
  346. ;Move the upper-left-hand corner of the panel to (h,v), given in local coordinates of
  347. ;the panel's window.
  348. ;
  349.  
  350. ;
  351. ; pascal OSErr SDPMovePanel(SDPPanelHandle panel, short h, short v)
  352. ;
  353.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  354.         Macro
  355.         _SDPMovePanel
  356.             move.l              #$0004006B,D0
  357.             dc.w                $AA5D
  358.         EndM
  359.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  360.         IMPORT_CFM_FUNCTION SDPMovePanel
  361.     ENDIF
  362.  
  363.  
  364. ;Resizes the panel to have the given width and height (keeping the upper-left-hand
  365. ;corner in a fixed position).
  366. ;
  367.  
  368. ;
  369. ; pascal OSErr SDPSizePanel(SDPPanelHandle panel, short width, short height)
  370. ;
  371.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  372.         Macro
  373.         _SDPSizePanel
  374.             move.l              #$0004006C,D0
  375.             dc.w                $AA5D
  376.         EndM
  377.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  378.         IMPORT_CFM_FUNCTION SDPSizePanel
  379.     ENDIF
  380.  
  381.  
  382. ;This routine simulates a double-click on the selected item (if there is no selected
  383. ;item, then it does nothing), and it returns the result of that "double-click" via the
  384. ;whatHappened parameter. If a container is selected, then that container will be
  385. ;opened and kMovedDownTheHierarchy is returned. If, however, the user is at the lowest
  386. ;level in the hierarchy, then kSDPSelectedAnItem is returned.
  387. ;
  388.  
  389. ;
  390. ; pascal OSErr SDPOpenSelectedItem(SDPPanelHandle panel, SDPPanelState *whatHappened)
  391. ;
  392.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  393.         Macro
  394.         _SDPOpenSelectedItem
  395.             move.l              #$0004006D,D0
  396.             dc.w                $AA5D
  397.         EndM
  398.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  399.         IMPORT_CFM_FUNCTION SDPOpenSelectedItem
  400.     ENDIF
  401.  
  402.  
  403. ;Returns whether a record is selected, something else is selected, or nothing is
  404. ;selected.
  405. ;
  406.  
  407. ;
  408. ; pascal OSErr SDPGetPanelSelectionState(SDPPanelHandle panel, SDPSelectionState *itsState)
  409. ;
  410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  411.         Macro
  412.         _SDPGetPanelSelectionState
  413.             move.l              #$0004006E,D0
  414.             dc.w                $AA5D
  415.         EndM
  416.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  417.         IMPORT_CFM_FUNCTION SDPGetPanelSelectionState
  418.     ENDIF
  419.  
  420.  
  421. ;Returns the size of the currently-selected DSSpec, or zero if a record is
  422. ;not selected.  It is safe to do a NewPtr (SDPGetPanelSelectionSize (...))
  423. ;
  424.  
  425. ;
  426. ; pascal OSErr SDPGetPanelSelectionSize(SDPPanelHandle panel, unsigned short *dsSpecSize)
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  429.         Macro
  430.         _SDPGetPanelSelectionSize
  431.             move.l              #$00040072,D0
  432.             dc.w                $AA5D
  433.         EndM
  434.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  435.         IMPORT_CFM_FUNCTION SDPGetPanelSelectionSize
  436.     ENDIF
  437.  
  438.  
  439. ;Returns the currently-selected DSSpec, or a zero-lengthed
  440. ;DSSpec if a record is not selected. It is assumed that the selection
  441. ;buffer allocated is large enough.
  442. ;
  443.  
  444. ;
  445. ; pascal OSErr SDPGetPanelSelection(SDPPanelHandle panel, PackedDSSpec *selection)
  446. ;
  447.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  448.         Macro
  449.         _SDPGetPanelSelection
  450.             move.l              #$0004006F,D0
  451.             dc.w                $AA5D
  452.         EndM
  453.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  454.         IMPORT_CFM_FUNCTION SDPGetPanelSelection
  455.     ENDIF
  456.  
  457.  
  458. ;Forces browsing to the specified RLI. If prli is the current RLI, then it does
  459. ;nothing.
  460. ;
  461.  
  462. ;
  463. ; pascal OSErr SDPSetPath(SDPPanelHandle panel, const PackedRLI *prli)
  464. ;
  465.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  466.         Macro
  467.         _SDPSetPath
  468.             move.l              #$00040070,D0
  469.             dc.w                $AA5D
  470.         EndM
  471.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  472.         IMPORT_CFM_FUNCTION SDPSetPath
  473.     ENDIF
  474.  
  475.  
  476. ;This is the main driver for the panel.  You should pass all events to SDPPanelEvent
  477. ;including NULL events.  If you have more than 1 panel, you will need to
  478. ;call SDPPanelEvent for each panel.  NOTE:  For Update Events you will also need to call
  479. ;SDPUpdatePanel as described below.
  480. ;
  481.  
  482. ;
  483. ; pascal OSErr SDPPanelEvent(SDPPanelHandle panel, const EventRecord *theEvent, SDPPanelState *whatHappened)
  484. ;
  485.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  486.         Macro
  487.         _SDPPanelEvent
  488.             move.l              #$00060071,D0
  489.             dc.w                $AA5D
  490.         EndM
  491.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION SDPPanelEvent
  493.     ENDIF
  494.  
  495.  
  496.  
  497. ;SDPUpdatePanel should be called in response to an update event.  Generally you will
  498. ;have first called BeginUpdate, and pass the windows visRgn as theRgn.  If NULL
  499. ;is passed for theRgn the entire panel is re-drawn.  NOTE:  Drawing is not cliped to
  500. ;theRgn, if this is desired, you must first call SetClip.
  501. ;
  502.  
  503. ;
  504. ; pascal OSErr SDPUpdatePanel(SDPPanelHandle panel, RgnHandle theRgn)
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  507.         Macro
  508.         _SDPUpdatePanel
  509.             move.l              #$0004006A,D0
  510.             dc.w                $AA5D
  511.         EndM
  512.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  513.         IMPORT_CFM_FUNCTION SDPUpdatePanel
  514.     ENDIF
  515.  
  516.  
  517. ;SDPSelectString scrolls and selects the closest matching string at the current
  518. ;level.  This is the same behavior as if the user typed in the given string.
  519. ;
  520.  
  521. ;
  522. ; pascal OSErr SDPSelectString(SDPPanelHandle panel, const RString *name)
  523. ;
  524.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  525.         Macro
  526.         _SDPSelectString
  527.             move.l              #$00040074,D0
  528.             dc.w                $AA5D
  529.         EndM
  530.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  531.         IMPORT_CFM_FUNCTION SDPSelectString
  532.     ENDIF
  533.  
  534. ;SDPGetPathLength returns the length in bytes required to hold the current path name
  535. ;in RLI format.  This corresponds to the path name in the popup menu.
  536. ;
  537.  
  538. ;
  539. ; pascal OSErr SDPGetPathLength(SDPPanelHandle panel, unsigned short *pathNameLength)
  540. ;
  541.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  542.         Macro
  543.         _SDPGetPathLength
  544.             move.l              #$00040075,D0
  545.             dc.w                $AA5D
  546.         EndM
  547.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION SDPGetPathLength
  549.     ENDIF
  550.  
  551. ;  SDPGetPath returns the current rli. 
  552. ;
  553. ; pascal OSErr SDPGetPath(SDPPanelHandle panel, PackedRLI *prli, short *dsRefNum)
  554. ;
  555.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  556.         Macro
  557.         _SDPGetPath
  558.             move.l              #$00060076,D0
  559.             dc.w                $AA5D
  560.         EndM
  561.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  562.         IMPORT_CFM_FUNCTION SDPGetPath
  563.     ENDIF
  564.  
  565. ;SDPSetFocus will draw the focus rectangle or erase the focus rectangle depending upon
  566. ;the focus boolean.
  567. ;
  568.  
  569. ;
  570. ; pascal OSErr SDPSetFocus(SDPPanelHandle panel, Boolean focus)
  571. ;
  572.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  573.         Macro
  574.         _SDPSetFocus
  575.             move.l              #$00030077,D0
  576.             dc.w                $AA5D
  577.         EndM
  578.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  579.         IMPORT_CFM_FUNCTION SDPSetFocus
  580.     ENDIF
  581.  
  582. ;SDPSetPanelBalloonHelp allows clients to specify a STR# resource id to use for 
  583. ;balloon help.  Balloon help is unavailable until this call is made.
  584. ;
  585.  
  586. ;
  587. ; pascal OSErr SDPSetPanelBalloonHelp(SDPPanelHandle panel, short balloonHelpID)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  590.         Macro
  591.         _SDPSetPanelBalloonHelp
  592.             move.l              #$00030078,D0
  593.             dc.w                $AA5D
  594.         EndM
  595.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  596.         IMPORT_CFM_FUNCTION SDPSetPanelBalloonHelp
  597.     ENDIF
  598.  
  599. ;SDPInstallPanelBusyProc allows clients to install a CB that will be called while
  600. ;the panel is aynchronously busy.
  601. ;
  602.  
  603. ;
  604. ; pascal OSErr SDPInstallPanelBusyProc(SDPPanelHandle panel, PanelBusyProc busyProc)
  605. ;
  606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  607.         Macro
  608.         _SDPInstallPanelBusyProc
  609.             move.l              #$00040079,D0
  610.             dc.w                $AA5D
  611.         EndM
  612.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  613.         IMPORT_CFM_FUNCTION SDPInstallPanelBusyProc
  614.     ENDIF
  615.  
  616.  
  617. ;
  618. ; pascal OSErr SDPNewFindPanel(SDPFindPanelHandle *newPanel, WindowPtr window, Point upperLeft, short layoutResourceID, Boolean visible, Boolean enabled, const RStringPtr *typesList, long typeCount, DirMatchWith matchTypeHow, AuthIdentity identity, short simultaneousSearchCount, SDPFindPanelFocus initialFocus, long refCon)
  619. ;
  620.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  621.         Macro
  622.         _SDPNewFindPanel
  623.             move.l              #$001408FC,D0
  624.             dc.w                $AA5D
  625.         EndM
  626.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  627.         IMPORT_CFM_FUNCTION SDPNewFindPanel
  628.     ENDIF
  629.  
  630. ;
  631. ; pascal OSErr SDPDisposeFindPanel(SDPFindPanelHandle findPanel)
  632. ;
  633.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  634.         Macro
  635.         _SDPDisposeFindPanel
  636.             move.l              #$000208FD,D0
  637.             dc.w                $AA5D
  638.         EndM
  639.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  640.         IMPORT_CFM_FUNCTION SDPDisposeFindPanel
  641.     ENDIF
  642.  
  643. ;
  644. ; pascal OSErr SDPStartFind(SDPFindPanelHandle findPanel)
  645. ;
  646.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  647.         Macro
  648.         _SDPStartFind
  649.             move.l              #$000208FE,D0
  650.             dc.w                $AA5D
  651.         EndM
  652.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  653.         IMPORT_CFM_FUNCTION SDPStartFind
  654.     ENDIF
  655.  
  656. ;
  657. ; pascal OSErr SDPStopFind(SDPFindPanelHandle findPanel)
  658. ;
  659.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  660.         Macro
  661.         _SDPStopFind
  662.             move.l              #$000208FF,D0
  663.             dc.w                $AA5D
  664.         EndM
  665.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  666.         IMPORT_CFM_FUNCTION SDPStopFind
  667.     ENDIF
  668.  
  669. ;
  670. ; pascal OSErr SDPFindPanelEvent(SDPFindPanelHandle findPanel, const EventRecord *event, SDPFindPanelResult *whatHappened)
  671. ;
  672.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  673.         Macro
  674.         _SDPFindPanelEvent
  675.             move.l              #$00060900,D0
  676.             dc.w                $AA5D
  677.         EndM
  678.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  679.         IMPORT_CFM_FUNCTION SDPFindPanelEvent
  680.     ENDIF
  681.  
  682. ;
  683. ; pascal OSErr SDPUpdateFindPanel(SDPFindPanelHandle findPanel, RgnHandle theRgn)
  684. ;
  685.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  686.         Macro
  687.         _SDPUpdateFindPanel
  688.             move.l              #$00040901,D0
  689.             dc.w                $AA5D
  690.         EndM
  691.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  692.         IMPORT_CFM_FUNCTION SDPUpdateFindPanel
  693.     ENDIF
  694.  
  695. ;
  696. ; pascal OSErr SDPShowFindPanel(SDPFindPanelHandle findPanel)
  697. ;
  698.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  699.         Macro
  700.         _SDPShowFindPanel
  701.             move.l              #$00020902,D0
  702.             dc.w                $AA5D
  703.         EndM
  704.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  705.         IMPORT_CFM_FUNCTION SDPShowFindPanel
  706.     ENDIF
  707.  
  708. ;
  709. ; pascal OSErr SDPHideFindPanel(SDPFindPanelHandle findPanel)
  710. ;
  711.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  712.         Macro
  713.         _SDPHideFindPanel
  714.             move.l              #$00020903,D0
  715.             dc.w                $AA5D
  716.         EndM
  717.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  718.         IMPORT_CFM_FUNCTION SDPHideFindPanel
  719.     ENDIF
  720.  
  721. ;
  722. ; pascal OSErr SDPMoveFindPanel(SDPFindPanelHandle findPanel, short h, short v)
  723. ;
  724.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  725.         Macro
  726.         _SDPMoveFindPanel
  727.             move.l              #$00040904,D0
  728.             dc.w                $AA5D
  729.         EndM
  730.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  731.         IMPORT_CFM_FUNCTION SDPMoveFindPanel
  732.     ENDIF
  733.  
  734. ;
  735. ; pascal OSErr SDPEnableFindPanel(SDPFindPanelHandle findPanel, Boolean enabled)
  736. ;
  737.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  738.         Macro
  739.         _SDPEnableFindPanel
  740.             move.l              #$00030905,D0
  741.             dc.w                $AA5D
  742.         EndM
  743.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  744.         IMPORT_CFM_FUNCTION SDPEnableFindPanel
  745.     ENDIF
  746.  
  747. ;
  748. ; pascal OSErr SDPSetFindPanelFocus(SDPFindPanelHandle findPanel, SDPFindPanelFocus newFocus)
  749. ;
  750.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  751.         Macro
  752.         _SDPSetFindPanelFocus
  753.             move.l              #$00030906,D0
  754.             dc.w                $AA5D
  755.         EndM
  756.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  757.         IMPORT_CFM_FUNCTION SDPSetFindPanelFocus
  758.     ENDIF
  759.  
  760. ;
  761. ; pascal OSErr SDPGetFindPanelState(SDPFindPanelHandle findPanel, SDPFindPanelState *itsState)
  762. ;
  763.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  764.         Macro
  765.         _SDPGetFindPanelState
  766.             move.l              #$00040907,D0
  767.             dc.w                $AA5D
  768.         EndM
  769.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  770.         IMPORT_CFM_FUNCTION SDPGetFindPanelState
  771.     ENDIF
  772.  
  773. ;
  774. ; pascal OSErr SDPGetFindPanelSelectionSize(SDPFindPanelHandle findPanel, unsigned short *size)
  775. ;
  776.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  777.         Macro
  778.         _SDPGetFindPanelSelectionSize
  779.             move.l              #$00040908,D0
  780.             dc.w                $AA5D
  781.         EndM
  782.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  783.         IMPORT_CFM_FUNCTION SDPGetFindPanelSelectionSize
  784.     ENDIF
  785.  
  786. ;
  787. ; pascal OSErr SDPGetFindPanelSelection(SDPFindPanelHandle findPanel, PackedDSSpec *selection)
  788. ;
  789.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  790.         Macro
  791.         _SDPGetFindPanelSelection
  792.             move.l              #$00040909,D0
  793.             dc.w                $AA5D
  794.         EndM
  795.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  796.         IMPORT_CFM_FUNCTION SDPGetFindPanelSelection
  797.     ENDIF
  798.  
  799. ;
  800. ; pascal OSErr SDPSetFindPanelBalloonHelp(SDPFindPanelHandle findPanel, short balloonHelpID)
  801. ;
  802.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  803.         Macro
  804.         _SDPSetFindPanelBalloonHelp
  805.             move.l              #$0003090A,D0
  806.             dc.w                $AA5D
  807.         EndM
  808.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  809.         IMPORT_CFM_FUNCTION SDPSetFindPanelBalloonHelp
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal OSErr SDPSetFindIdentity(SDPFindPanelHandle findPanel, AuthIdentity identity)
  814. ;
  815.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  816.         Macro
  817.         _SDPSetFindIdentity
  818.             move.l              #$0004090B,D0
  819.             dc.w                $AA5D
  820.         EndM
  821.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  822.         IMPORT_CFM_FUNCTION SDPSetFindIdentity
  823.     ENDIF
  824.  
  825. ;
  826. ; pascal OSErr SDPInstallFindPanelBusyProc(SDPFindPanelHandle findPanel, FindPanelBusyProc busyProc)
  827. ;
  828.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  829.         Macro
  830.         _SDPInstallFindPanelBusyProc
  831.             move.l              #$0004090C,D0
  832.             dc.w                $AA5D
  833.         EndM
  834.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  835.         IMPORT_CFM_FUNCTION SDPInstallFindPanelBusyProc
  836.     ENDIF
  837.  
  838.  
  839.  
  840. ;
  841. ; pascal OSErr SDPGetIconByType(const RString *recordType, IconSelectorValue whichIcons, Handle *iconSuite)
  842. ;
  843.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  844.         Macro
  845.         _SDPGetIconByType
  846.             move.w              #$0400,D0
  847.             dc.w                $AA5C
  848.         EndM
  849.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  850.         IMPORT_CFM_FUNCTION SDPGetIconByType
  851.     ENDIF
  852.  
  853. ;
  854. ; pascal OSErr SDPGetDSSpecIcon(const PackedDSSpec *packedDSSpec, IconSelectorValue whichIcons, Handle *iconSuite)
  855. ;
  856.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  857.         Macro
  858.         _SDPGetDSSpecIcon
  859.             move.w              #$0401,D0
  860.             dc.w                $AA5C
  861.         EndM
  862.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  863.         IMPORT_CFM_FUNCTION SDPGetDSSpecIcon
  864.     ENDIF
  865.  
  866. ;
  867. ; pascal OSErr SDPGetCategories(PackedRStringListHandle *categories, PackedRStringListHandle *displayNames)
  868. ;
  869.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  870.         Macro
  871.         _SDPGetCategories
  872.             move.w              #$0402,D0
  873.             dc.w                $AA5C
  874.         EndM
  875.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  876.         IMPORT_CFM_FUNCTION SDPGetCategories
  877.     ENDIF
  878.  
  879. ;
  880. ; pascal OSErr SDPGetCategoryTypes(const RString *category, PackedRStringListHandle *types)
  881. ;
  882.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  883.         Macro
  884.         _SDPGetCategoryTypes
  885.             move.w              #$0403,D0
  886.             dc.w                $AA5C
  887.         EndM
  888.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  889.         IMPORT_CFM_FUNCTION SDPGetCategoryTypes
  890.     ENDIF
  891.  
  892.  
  893.  
  894.  
  895. ;
  896. ; pascal OSErr SDPResolveAliasFile(FSSpecPtr fileSpec, PackedDSSpecHandle resolvedDSSpec, AuthIdentity identity, Boolean mayPromptUser)
  897. ;
  898.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  899.         Macro
  900.         _SDPResolveAliasFile
  901.             move.l              #$00070E74,D0
  902.             dc.w                $AA5D
  903.         EndM
  904.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  905.         IMPORT_CFM_FUNCTION SDPResolveAliasFile
  906.     ENDIF
  907.  
  908. ;
  909. ; pascal OSErr SDPResolveAliasDSSpec(PackedDSSpecHandle theAliasDSSpec, AuthIdentity identity, Boolean mayPromptUser)
  910. ;
  911.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  912.         Macro
  913.         _SDPResolveAliasDSSpec
  914.             move.l              #$00050E75,D0
  915.             dc.w                $AA5D
  916.         EndM
  917.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  918.         IMPORT_CFM_FUNCTION SDPResolveAliasDSSpec
  919.     ENDIF
  920.  
  921. ;
  922. ; pascal OSErr SDPRepairPersonalDirectory(FSSpec *pd, Boolean showProgress)
  923. ;
  924.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  925.         Macro
  926.         _SDPRepairPersonalDirectory
  927.             move.l              #$00031A2C,D0
  928.             dc.w                $AA5D
  929.         EndM
  930.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  931.         IMPORT_CFM_FUNCTION SDPRepairPersonalDirectory
  932.     ENDIF
  933.  
  934.  
  935.     ENDIF ; __OCESTANDARDDIRECTORY__ 
  936.  
  937.